#ifndef FINDDIALOG_H
#define FINDDIALOG_H

#include <QWidget>
#include "Include/Plugins.h"

namespace Ui {
    class FindDialog;
}
class CurrentEditor;

class FindDialog : public QWidget
{
    Q_OBJECT

public:
    explicit FindDialog(CurrentEditor * edit, QWidget *parent = 0);
    ~FindDialog();
    QString findText();
    QString replaceText();
    void activate();
signals:
    void findAvailable(bool);
    void replaceAvailable(bool);
    void findNext();
    void findPrevious();
    void replace();
    void replaceFind();
    void replaceAll();
protected slots:
    void onTextChanged(const QString& text);
    void onReplaceChanged(const QString& text);
protected:
    void showEvent(QShowEvent *);

private:
    Ui::FindDialog *ui;
    CurrentEditor * _editor;
};

#endif // FINDDIALOG_H
